import React,{Component} from "react";
import {Switch,Route,Redirect} from "react-router-dom";
import ProductHome from "./home";
import Detail from "./detail";
import AddUpdate from "./addupdate";
import "./product.less"
export default class Product extends Component{
    render() {
        return(
          <Switch>
              {/*exact表示精准匹配*/}
              <Route path="/product" exact component={ProductHome} />
              <Route path="/product/addUpdate" component={AddUpdate}/>
              <Route path="/product/detail" component={Detail}/>
              <Redirect to="/product" />
          </Switch>
        )
    }
}
